{extend name="admin/layout" /}
{block name="main"}
<div class="row">
    <div class="col-md-offset-3 col-md-6">
        <div class="panel">
            <div class="panel-heading">主站配置</div>
            <div class="panel-body">
                <div class="alert alert-info text-center">
                    <i class="fa fa-volume-up"></i> 提示：所有价格单位均为RMB/元，可精确到小数点后两位；所有比例均为不大于100的正整数
                </div>
                <form role="form" class="form-horizontal" method="post">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">主站地址</label>
                        <div class="col-sm-10">
                            <input type="text" name="domain" class="form-control"
                                   value="{:config('zz_domain')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">分站可选择域名</label>
                        <div class="col-sm-10">
                            <input type="text" name="domains" class="form-control"
                                   value="{:config('zz_domains')}">
                            <pre>多个域名用,隔开！</pre>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">主站站长QQ</label>
                        <div class="col-sm-10">
                            <input type="text" name="qq" class="form-control" value="{:config('zz_qq')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">一次性充值满多少送免费开通分站资格（元）</label>
                        <div class="col-sm-10">
                            <input type="text" name="price_sfz" class="form-control" value="{:config('zz_price_sfz')}">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">QQ登录调用API地址</label>
                        <div class="col-sm-10">
                            <input type="text" name="login_api" class="form-control" value="{:config('zz_login_api')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">圈圈赞API地址</label>
                        <div class="col-sm-10">
                            <input type="text" name="quan_api" class="form-control" value="{:config('zz_quan_api')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">添加QQ模式</label>
                        <div class="col-sm-10">
                            <select name="addqq_mode" class="form-control">
                                <option value="0" {if condition="config('zz_addqq_mode') eq 0" }selected{/if}>登录并验证QQ密码</option>
                                <option value="1" {if condition="config('zz_addqq_mode') eq 1" }selected{/if}>无需验证QQ密码</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">监控密钥</label>
                        <div class="col-sm-10">
                            <input type="text" name="cronkey" class="form-control" value="{:config('zz_cronkey')}"
                                   placeholder="可留空">
                            <pre>如需自动签到，需要监控http://{$_SERVER['HTTP_HOST']}/cron/qd.php?key=监控密钥</pre>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">全套代挂成本价格</label>
                        <div class="col-sm-10">
                            <input type="text" name="price_all" class="form-control"
                                   value="{:config('zz_price_all_rule')}">
                            <pre>拿货价格格式：分站价格|主站价格|超级主站价格</pre>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">单个项目代挂成本价格</label>
                        <div class="col-sm-10">
                            <input type="text" name="price_dx" class="form-control"
                                   value="{:config('zz_price_dx_rule')}">
                            <pre>拿货价格格式：分站价格|主站价格|超级主站价格</pre>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">开通二级主站价格</label>
                        <div class="col-sm-10">
                            <input type="number" name="price_ktfz_super" class="form-control"
                                   value="{:config('zz_price_ktfz_super')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">申请提现余额比例</label>
                        <div class="col-sm-10">
                            <input type="text" name="tixian_rate" class="form-control"
                                   value="{:config('zz_tixian_rate')}" placeholder="填写百分数，例如90">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">申请提现最低余额</label>
                        <div class="col-sm-10">
                            <input type="text" name="tixian_min" class="form-control"
                                   value="{:config('zz_tixian_min')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">分站开分站提成比例(百分数)</label>
                        <div class="col-sm-10">
                            <input type="text" name="ktfz_rate" class="form-control"
                                   value="{:config('zz_ktfz_rate')}" placeholder="填写百分数，例如10">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">被邀请人下单提成比例(百分数)</label>
                        <div class="col-sm-10">
                            <input type="text" name="invite_rate" class="form-control"
                                   value="{:config('zz_invite_rate')}" placeholder="填写百分数，例如10">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">填写邀请码被邀请方获得奖励</label>
                        <div class="col-sm-10">
                            <input type="text" name="point_invite1" class="form-control"
                                   value="{:config('zz_point_invite1')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">填写邀请码邀请方获得奖励</label>
                        <div class="col-sm-10">
                            <input type="text" name="point_invite2" class="form-control"
                                   value="{:config('zz_point_invite2')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">每天前多少个签到有奖励</label>
                        <div class="col-sm-10">
                            <input type="text" name="qiandao_num" class="form-control"
                                   value="{:config('zz_qiandao_num')}" placeholder="0为无限制">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">签到送金币规则</label>
                        <div class="col-sm-10">
                            <input type="text" name="qiandao_rule" class="form-control"
                                   value="{:config('zz_qiandao_rule')}">
                            <div class="alert alert-danger">1:10 代表连续签到1天送10金币，多条规则用,隔开<br>
                                1:10,3:20,5:30 代表连续签到第一天送10，第二天送10，第三天送20，第4天送20，第五天送30，以后都是送30。以此类推！
                            </div>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">自动更新价格(金币/月)</label>
                        <div class="col-sm-10">
                            <input type="text" name="price_auto" class="form-control"
                                   value="{:config('zz_price_auto')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">自动检测价格(金币/月)</label>
                        <div class="col-sm-10">
                            <input type="text" name="price_yc" class="form-control"
                                   value="{:config('zz_price_yc')}">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">聊天室屏幕词汇</label>
                        <div class="col-sm-10">
                            <input type="text" name="chat_stop" class="form-control"
                                   value="{:config('zz_chat_stop')}">
                            <div class="alert alert-danger">多个词汇用,隔开
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">聊天室公告</label>
                        <div class="col-sm-10">
                            <textarea name="gg_chat" rows="5" class="form-control">{:getHtmlCode(config('zz_gg_chat'),true)}</textarea>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">分站后台公告</label>
                        <div class="col-sm-10">
                            <textarea name="gg_admin" rows="5" class="form-control">{:getHtmlCode(config('zz_gg_admin'),true)}</textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">代刷业务下单公告</label>
                        <div class="col-sm-10">
                            <textarea name="gg_shequ" rows="5" class="form-control">{:getHtmlCode(config('zz_gg_shequ'),true)}</textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button class="btn btn-success" type="submit">&lt;&lt;&lt;保存&gt;&gt;&gt;</button>
                        </div>
                    </div>
                </form>

            </div>
        </div>
    </div>
</div>
<script>
    var items = $("select[default]") || 0;
    for (i = 0; i < items.length; i++) {
        $(items[i]).val($(items[i]).attr("default"));
    }
</script>
{/block}
